/**
 * 营销活动
 */
import request from '@/utils/request'

/**
 * @method addActivity
 * @description 新增活动
 */
export function addActivity(data) {
  return request({
    url: '/mall/admin/activity/add',
    method: 'post',
    data: data
  })
}

/**
 * @method updateActivity
 * @description 更新活动
 */
export function updateActivity(data) {
  return request({
    url: '/mall/admin/activity/update',
    method: 'post',
    data: data
  })
}

/**
 * @method activityDetail
 * @description 详情
 */
export function activityDetail(params) {
  return request({
    url: '/mall/admin/activity/detail',
    method: 'get',
    params: params
  })
}

/**
 * @method activityList
 * @description 活动列表
 */
export function activityList(data) {
  return request({
    url: '/mall/admin/activity/list',
    method: 'post',
    data: data
  })
}

/**
 * @method changeActivityStatus
 * @description 修改活动状态
 */
export function changeActivityStatus(data) {
  return request({
    url: '/mall/admin/activity/change_status',
    method: 'post',
    data: data
  })
}
